/*
 * Copyright 2011 Katsunori Koyanagi
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package sweezy.swf.abc
{
	import flash.utils.Dictionary;
	import flash.utils.getQualifiedClassName;
	import sweezy.swf.abc.opcode.AbsJump;
	import sweezy.swf.abc.opcode.Add;
	import sweezy.swf.abc.opcode.AddD;
	import sweezy.swf.abc.opcode.AddI;
	import sweezy.swf.abc.opcode.AddP;
	import sweezy.swf.abc.opcode.Alloc;
	import sweezy.swf.abc.opcode.Applytype;
	import sweezy.swf.abc.opcode.Astype;
	import sweezy.swf.abc.opcode.Astypelate;
	import sweezy.swf.abc.opcode.Bitand;
	import sweezy.swf.abc.opcode.Bitnot;
	import sweezy.swf.abc.opcode.Bitor;
	import sweezy.swf.abc.opcode.Bitxor;
	import sweezy.swf.abc.opcode.Bkpt;
	import sweezy.swf.abc.opcode.Bkptline;
	import sweezy.swf.abc.opcode.Call;
	import sweezy.swf.abc.opcode.Callinterface;
	import sweezy.swf.abc.opcode.Callmethod;
	import sweezy.swf.abc.opcode.Callproperty;
	import sweezy.swf.abc.opcode.Callproplex;
	import sweezy.swf.abc.opcode.Callpropvoid;
	import sweezy.swf.abc.opcode.Callstatic;
	import sweezy.swf.abc.opcode.Callsuper;
	import sweezy.swf.abc.opcode.Callsuperid;
	import sweezy.swf.abc.opcode.Callsupervoid;
	import sweezy.swf.abc.opcode.Checkfilter;
	import sweezy.swf.abc.opcode.Codegenop;
	import sweezy.swf.abc.opcode.Coerce;
	import sweezy.swf.abc.opcode.CoerceA;
	import sweezy.swf.abc.opcode.CoerceB;
	import sweezy.swf.abc.opcode.CoerceD;
	import sweezy.swf.abc.opcode.CoerceI;
	import sweezy.swf.abc.opcode.CoerceO;
	import sweezy.swf.abc.opcode.CoerceS;
	import sweezy.swf.abc.opcode.CoerceU;
	import sweezy.swf.abc.opcode.Concat;
	import sweezy.swf.abc.opcode.Construct;
	import sweezy.swf.abc.opcode.Constructprop;
	import sweezy.swf.abc.opcode.Constructsuper;
	import sweezy.swf.abc.opcode.ConvertB;
	import sweezy.swf.abc.opcode.ConvertD;
	import sweezy.swf.abc.opcode.ConvertI;
	import sweezy.swf.abc.opcode.ConvertM;
	import sweezy.swf.abc.opcode.ConvertMP;
	import sweezy.swf.abc.opcode.ConvertO;
	import sweezy.swf.abc.opcode.ConvertS;
	import sweezy.swf.abc.opcode.ConvertU;
	import sweezy.swf.abc.opcode.Debug;
	import sweezy.swf.abc.opcode.Debugfile;
	import sweezy.swf.abc.opcode.Debugline;
	import sweezy.swf.abc.opcode.Declocal;
	import sweezy.swf.abc.opcode.DeclocalI;
	import sweezy.swf.abc.opcode.DeclocalP;
	import sweezy.swf.abc.opcode.Decode;
	import sweezy.swf.abc.opcode.Decrement;
	import sweezy.swf.abc.opcode.DecrementI;
	import sweezy.swf.abc.opcode.DecrementP;
	import sweezy.swf.abc.opcode.Deldescendants;
	import sweezy.swf.abc.opcode.Deleteproperty;
	import sweezy.swf.abc.opcode.Divide;
	import sweezy.swf.abc.opcode.DivideP;
	import sweezy.swf.abc.opcode.Doubletoatom;
	import sweezy.swf.abc.opcode.Dup;
	import sweezy.swf.abc.opcode.Dxns;
	import sweezy.swf.abc.opcode.Dxnslate;
	import sweezy.swf.abc.opcode.Equals;
	import sweezy.swf.abc.opcode.EscXattr;
	import sweezy.swf.abc.opcode.EscXelem;
	import sweezy.swf.abc.opcode.Finddef;
	import sweezy.swf.abc.opcode.Findproperty;
	import sweezy.swf.abc.opcode.Findpropstrict;
	import sweezy.swf.abc.opcode.Getdescendants;
	import sweezy.swf.abc.opcode.Getglobalscope;
	import sweezy.swf.abc.opcode.Getglobalslot;
	import sweezy.swf.abc.opcode.Getlex;
	import sweezy.swf.abc.opcode.Getlocal;
	import sweezy.swf.abc.opcode.Getlocal0;
	import sweezy.swf.abc.opcode.Getlocal1;
	import sweezy.swf.abc.opcode.Getlocal2;
	import sweezy.swf.abc.opcode.Getlocal3;
	import sweezy.swf.abc.opcode.Getproperty;
	import sweezy.swf.abc.opcode.Getscopeobject;
	import sweezy.swf.abc.opcode.Getslot;
	import sweezy.swf.abc.opcode.Getsuper;
	import sweezy.swf.abc.opcode.Greaterequals;
	import sweezy.swf.abc.opcode.Greaterthan;
	import sweezy.swf.abc.opcode.Hasnext;
	import sweezy.swf.abc.opcode.Hasnext2;
	import sweezy.swf.abc.opcode.Ifeq;
	import sweezy.swf.abc.opcode.Iffalse;
	import sweezy.swf.abc.opcode.Ifge;
	import sweezy.swf.abc.opcode.Ifgt;
	import sweezy.swf.abc.opcode.Ifle;
	import sweezy.swf.abc.opcode.Iflt;
	import sweezy.swf.abc.opcode.Ifne;
	import sweezy.swf.abc.opcode.Ifnge;
	import sweezy.swf.abc.opcode.Ifngt;
	import sweezy.swf.abc.opcode.Ifnle;
	import sweezy.swf.abc.opcode.Ifnlt;
	import sweezy.swf.abc.opcode.Ifstricteq;
	import sweezy.swf.abc.opcode.Ifstrictne;
	import sweezy.swf.abc.opcode.Iftrue;
	import sweezy.swf.abc.opcode.In;
	import sweezy.swf.abc.opcode.Inclocal;
	import sweezy.swf.abc.opcode.InclocalI;
	import sweezy.swf.abc.opcode.InclocalP;
	import sweezy.swf.abc.opcode.Increment;
	import sweezy.swf.abc.opcode.IncrementI;
	import sweezy.swf.abc.opcode.IncrementP;
	import sweezy.swf.abc.opcode.Initproperty;
	import sweezy.swf.abc.opcode.Instanceof;
	import sweezy.swf.abc.opcode.Istype;
	import sweezy.swf.abc.opcode.Istypelate;
	import sweezy.swf.abc.opcode.Jump;
	import sweezy.swf.abc.opcode.Kill;
	import sweezy.swf.abc.opcode.Label;
	import sweezy.swf.abc.opcode.Lessequals;
	import sweezy.swf.abc.opcode.Lessthan;
	import sweezy.swf.abc.opcode.Lf32;
	import sweezy.swf.abc.opcode.Lf64;
	import sweezy.swf.abc.opcode.Li16;
	import sweezy.swf.abc.opcode.Li32;
	import sweezy.swf.abc.opcode.Li8;
	import sweezy.swf.abc.opcode.Lookupswitch;
	import sweezy.swf.abc.opcode.Lshift;
	import sweezy.swf.abc.opcode.Mark;
	import sweezy.swf.abc.opcode.Modulo;
	import sweezy.swf.abc.opcode.ModuloP;
	import sweezy.swf.abc.opcode.Multiply;
	import sweezy.swf.abc.opcode.MultiplyI;
	import sweezy.swf.abc.opcode.MultiplyP;
	import sweezy.swf.abc.opcode.Negate;
	import sweezy.swf.abc.opcode.NegateI;
	import sweezy.swf.abc.opcode.NegateP;
	import sweezy.swf.abc.opcode.Newactivation;
	import sweezy.swf.abc.opcode.Newarray;
	import sweezy.swf.abc.opcode.Newcatch;
	import sweezy.swf.abc.opcode.Newclass;
	import sweezy.swf.abc.opcode.Newfunction;
	import sweezy.swf.abc.opcode.Newobject;
	import sweezy.swf.abc.opcode.Nextname;
	import sweezy.swf.abc.opcode.Nextvalue;
	import sweezy.swf.abc.opcode.Nop;
	import sweezy.swf.abc.opcode.Not;
	import sweezy.swf.abc.opcode.Pop;
	import sweezy.swf.abc.opcode.Popscope;
	import sweezy.swf.abc.opcode.Prologue;
	import sweezy.swf.abc.opcode.Pushbyte;
	import sweezy.swf.abc.opcode.Pushdecimal;
	import sweezy.swf.abc.opcode.Pushdnan;
	import sweezy.swf.abc.opcode.Pushdouble;
	import sweezy.swf.abc.opcode.Pushfalse;
	import sweezy.swf.abc.opcode.Pushint;
	import sweezy.swf.abc.opcode.Pushnamespace;
	import sweezy.swf.abc.opcode.Pushnan;
	import sweezy.swf.abc.opcode.Pushnull;
	import sweezy.swf.abc.opcode.Pushscope;
	import sweezy.swf.abc.opcode.Pushshort;
	import sweezy.swf.abc.opcode.Pushstring;
	import sweezy.swf.abc.opcode.Pushtrue;
	import sweezy.swf.abc.opcode.Pushuint;
	import sweezy.swf.abc.opcode.Pushundefined;
	import sweezy.swf.abc.opcode.Pushuninitialized;
	import sweezy.swf.abc.opcode.Pushwith;
	import sweezy.swf.abc.opcode.Returnvalue;
	import sweezy.swf.abc.opcode.Returnvoid;
	import sweezy.swf.abc.opcode.Rshift;
	import sweezy.swf.abc.opcode.Sendenter;
	import sweezy.swf.abc.opcode.Setglobalslot;
	import sweezy.swf.abc.opcode.Setlocal;
	import sweezy.swf.abc.opcode.Setlocal0;
	import sweezy.swf.abc.opcode.Setlocal1;
	import sweezy.swf.abc.opcode.Setlocal2;
	import sweezy.swf.abc.opcode.Setlocal3;
	import sweezy.swf.abc.opcode.Setproperty;
	import sweezy.swf.abc.opcode.Setslot;
	import sweezy.swf.abc.opcode.Setsuper;
	import sweezy.swf.abc.opcode.Sf32;
	import sweezy.swf.abc.opcode.Sf64;
	import sweezy.swf.abc.opcode.Si16;
	import sweezy.swf.abc.opcode.Si32;
	import sweezy.swf.abc.opcode.Si8;
	import sweezy.swf.abc.opcode.Strictequals;
	import sweezy.swf.abc.opcode.Subtract;
	import sweezy.swf.abc.opcode.SubtractI;
	import sweezy.swf.abc.opcode.SubtractP;
	import sweezy.swf.abc.opcode.Swap;
	import sweezy.swf.abc.opcode.Sweep;
	import sweezy.swf.abc.opcode.Sxi1;
	import sweezy.swf.abc.opcode.Sxi16;
	import sweezy.swf.abc.opcode.Sxi8;
	import sweezy.swf.abc.opcode.Throw;
	import sweezy.swf.abc.opcode.Timestamp;
	import sweezy.swf.abc.opcode.Typeof;
	import sweezy.swf.abc.opcode.Urshift;
	import sweezy.swf.abc.opcode.Verifyop;
	import sweezy.swf.abc.opcode.Verifypass;
	import sweezy.swf.abc.opcode.Wb;

	public class Opcodes
	{

		public static const OP_abs_jump:uint = 0xee;

		public static const OP_add:uint = 0xa0;

		public static const OP_add_d:uint = 0x9b;

		public static const OP_add_i:uint = 0xc5;

		public static const OP_add_p:uint = 0xb5;

		public static const OP_alloc:uint = 0xf6;

		public static const OP_applytype:uint = 0x53;

		public static const OP_astype:uint = 0x86;

		public static const OP_astypelate:uint = 0x87;

		public static const OP_bitand:uint = 0xa8;

		public static const OP_bitnot:uint = 0x97;

		public static const OP_bitor:uint = 0xa9;

		public static const OP_bitxor:uint = 0xaa;

		public static const OP_bkpt:uint = 0x01;

		public static const OP_bkptline:uint = 0xf2;

		public static const OP_call:uint = 0x41;

		public static const OP_callinterface:uint = 0x4d;

		public static const OP_callmethod:uint = 0x43;

		public static const OP_callproperty:uint = 0x46;

		public static const OP_callproplex:uint = 0x4c;

		public static const OP_callpropvoid:uint = 0x4f;

		public static const OP_callstatic:uint = 0x44;

		public static const OP_callsuper:uint = 0x45;

		public static const OP_callsuperid:uint = 0x4b;

		public static const OP_callsupervoid:uint = 0x4e;

		public static const OP_checkfilter:uint = 0x78;

		public static const OP_codegenop:uint = 0xfd;

		public static const OP_coerce:uint = 0x80;

		public static const OP_coerce_a:uint = 0x82;

		public static const OP_coerce_b:uint = 0x81;

		public static const OP_coerce_d:uint = 0x84;

		public static const OP_coerce_i:uint = 0x83;

		public static const OP_coerce_o:uint = 0x89;

		public static const OP_coerce_s:uint = 0x85;

		public static const OP_coerce_u:uint = 0x88;

		public static const OP_concat:uint = 0x9a;

		public static const OP_construct:uint = 0x42;

		public static const OP_constructprop:uint = 0x4a;

		public static const OP_constructsuper:uint = 0x49;

		public static const OP_convert_b:uint = 0x76;

		public static const OP_convert_d:uint = 0x75;

		public static const OP_convert_i:uint = 0x73;

		public static const OP_convert_m:uint = 0x79;

		public static const OP_convert_m_p:uint = 0x7a;

		public static const OP_convert_o:uint = 0x77;

		public static const OP_convert_s:uint = 0x70;

		public static const OP_convert_u:uint = 0x74;

		public static const OP_debug:uint = 0xef;

		public static const OP_debugfile:uint = 0xf1;

		public static const OP_debugline:uint = 0xf0;

		public static const OP_declocal:uint = 0x94;

		public static const OP_declocal_i:uint = 0xc3;

		public static const OP_declocal_p:uint = 0x9f;

		public static const OP_decode:uint = 0xff;

		public static const OP_decrement:uint = 0x93;

		public static const OP_decrement_i:uint = 0xc1;

		public static const OP_decrement_p:uint = 0x9e;

		public static const OP_deldescendants:uint = 0x5b;

		public static const OP_deleteproperty:uint = 0x6a;

		public static const OP_divide:uint = 0xa3;

		public static const OP_divide_p:uint = 0xb8;

		public static const OP_doubletoatom:uint = 0xfb;

		public static const OP_dup:uint = 0x2a;

		public static const OP_dxns:uint = 0x06;

		public static const OP_dxnslate:uint = 0x07;

		public static const OP_equals:uint = 0xab;

		public static const OP_esc_xattr:uint = 0x72;

		public static const OP_esc_xelem:uint = 0x71;

		public static const OP_finddef:uint = 0x5f;

		public static const OP_findproperty:uint = 0x5e;

		public static const OP_findpropstrict:uint = 0x5d;

		public static const OP_getdescendants:uint = 0x59;

		public static const OP_getglobalscope:uint = 0x64;

		public static const OP_getglobalslot:uint = 0x6e;

		public static const OP_getlex:uint = 0x60;

		public static const OP_getlocal:uint = 0x62;

		public static const OP_getlocal0:uint = 0xd0;

		public static const OP_getlocal1:uint = 0xd1;

		public static const OP_getlocal2:uint = 0xd2;

		public static const OP_getlocal3:uint = 0xd3;

		public static const OP_getproperty:uint = 0x66;

		public static const OP_getscopeobject:uint = 0x65;

		public static const OP_getslot:uint = 0x6c;

		public static const OP_getsuper:uint = 0x04;

		public static const OP_greaterequals:uint = 0xb0;

		public static const OP_greaterthan:uint = 0xaf;

		public static const OP_hasnext:uint = 0x1f;

		public static const OP_hasnext2:uint = 0x32;

		public static const OP_ifeq:uint = 0x13;

		public static const OP_iffalse:uint = 0x12;

		public static const OP_ifge:uint = 0x18;

		public static const OP_ifgt:uint = 0x17;

		public static const OP_ifle:uint = 0x16;

		public static const OP_iflt:uint = 0x15;

		public static const OP_ifne:uint = 0x14;

		public static const OP_ifnge:uint = 0xf;

		public static const OP_ifngt:uint = 0x0e;

		public static const OP_ifnle:uint = 0x0d;

		public static const OP_ifnlt:uint = 0x0c;

		public static const OP_ifstricteq:uint = 0x19;

		public static const OP_ifstrictne:uint = 0x1a;

		public static const OP_iftrue:uint = 0x11;

		public static const OP_in:uint = 0xb4;

		public static const OP_inclocal:uint = 0x92;

		public static const OP_inclocal_i:uint = 0xc2;

		public static const OP_inclocal_p:uint = 0x9d;

		public static const OP_increment:uint = 0x91;

		public static const OP_increment_i:uint = 0xc0;

		public static const OP_increment_p:uint = 0x9c;

		public static const OP_initproperty:uint = 0x68;

		public static const OP_instanceof:uint = 0xb1;

		public static const OP_istype:uint = 0xb2;

		public static const OP_istypelate:uint = 0xb3;

		public static const OP_jump:uint = 0x10;

		public static const OP_kill:uint = 0x08;

		public static const OP_label:uint = 0x09;

		public static const OP_lessequals:uint = 0xae;

		public static const OP_lessthan:uint = 0xad;

		public static const OP_lf32:uint = 0x38;

		public static const OP_lf64:uint = 0x39;

		public static const OP_li16:uint = 0x36;

		public static const OP_li32:uint = 0x37;

		public static const OP_li8:uint = 0x35;

		public static const OP_lookupswitch:uint = 0x1b;

		public static const OP_lshift:uint = 0xa5;

		public static const OP_mark:uint = 0xf7;

		public static const OP_modulo:uint = 0xa4;

		public static const OP_modulo_p:uint = 0xb9;

		public static const OP_multiply:uint = 0xa2;

		public static const OP_multiply_i:uint = 0xc7;

		public static const OP_multiply_p:uint = 0xb7;

		public static const OP_negate:uint = 0x90;

		public static const OP_negate_i:uint = 0xc4;

		public static const OP_negate_p:uint = 0x8f;

		public static const OP_newactivation:uint = 0x57;

		public static const OP_newarray:uint = 0x56;

		public static const OP_newcatch:uint = 0x5a;

		public static const OP_newclass:uint = 0x58;

		public static const OP_newfunction:uint = 0x40;

		public static const OP_newobject:uint = 0x55;

		public static const OP_nextname:uint = 0x1e;

		public static const OP_nextvalue:uint = 0x23;

		public static const OP_nop:uint = 0x02;

		public static const OP_not:uint = 0x96;

		public static const OP_pop:uint = 0x29;

		public static const OP_popscope:uint = 0x1d;

		public static const OP_prologue:uint = 0xf9;

		public static const OP_pushbyte:uint = 0x24;

		public static const OP_pushdecimal:uint = 0x33;

		public static const OP_pushdnan:uint = 0x34;

		public static const OP_pushdouble:uint = 0x2f;

		public static const OP_pushfalse:uint = 0x27;

		public static const OP_pushint:uint = 0x2d;

		public static const OP_pushnamespace:uint = 0x31;

		public static const OP_pushnan:uint = 0x28;

		public static const OP_pushnull:uint = 0x20;

		public static const OP_pushscope:uint = 0x30;

		public static const OP_pushshort:uint = 0x25;

		public static const OP_pushstring:uint = 0x2c;

		public static const OP_pushtrue:uint = 0x26;

		public static const OP_pushuint:uint = 0x2e;

		public static const OP_pushundefined:uint = 0x21;

		public static const OP_pushuninitialized:uint = 0x22;

		public static const OP_pushwith:uint = 0x1c;

		public static const OP_returnvalue:uint = 0x48;

		public static const OP_returnvoid:uint = 0x47;

		public static const OP_rshift:uint = 0xa6;

		public static const OP_sendenter:uint = 0xfa;

		public static const OP_setglobalslot:uint = 0x6f;

		public static const OP_setlocal:uint = 0x63;

		public static const OP_setlocal0:uint = 0xd4;

		public static const OP_setlocal1:uint = 0xd5;

		public static const OP_setlocal2:uint = 0xd6;

		public static const OP_setlocal3:uint = 0xd7;

		public static const OP_setproperty:uint = 0x61;

		public static const OP_setslot:uint = 0x6d;

		public static const OP_setsuper:uint = 0x05;

		public static const OP_sf32:uint = 0x3d;

		public static const OP_sf64:uint = 0x3e;

		public static const OP_si16:uint = 0x3b;

		public static const OP_si32:uint = 0x3c;

		public static const OP_si8:uint = 0x3a;

		public static const OP_strictequals:uint = 0xac;

		public static const OP_subtract:uint = 0xa1;

		public static const OP_subtract_i:uint = 0xc6;

		public static const OP_subtract_p:uint = 0xb6;

		public static const OP_swap:uint = 0x2b;

		public static const OP_sweep:uint = 0xfc;

		public static const OP_sxi1:uint = 0x50;

		public static const OP_sxi16:uint = 0x52;

		public static const OP_sxi8:uint = 0x51;

		public static const OP_throw:uint = 0x03;

		public static const OP_timestamp:uint = 0xf3;

		public static const OP_typeof:uint = 0x95;

		public static const OP_urshift:uint = 0xa7;

		public static const OP_verifyop:uint = 0xfe;

		public static const OP_verifypass:uint = 0xf5;

		public static const OP_wb:uint = 0xf8;

		internal static var _codes:Dictionary;

		internal static var _names:Array;

		internal static var _typeNames:Array;

		private static var _types:Array;

		internal static var _visitorNames:Array;

		public static function getName(code:uint):String
		{
			return _names[code];
		}

		public static function getType(code:uint):Class
		{
			return _types[code];
		}

		public static function getTypeName(code:uint):String
		{
			return _typeNames[code];
		}

		private static function addOpcode(index:uint, name:String, type:Class):void
		{
			var typeName:String = getQualifiedClassName(type);
			var idx:int = typeName.indexOf("::");
			if (idx > -1)
			{
				typeName = typeName.substring(idx + 2);
			}

			var visitorName:String = "visit";
			for each (var token:String in name.split("_"))
			{
				visitorName += token.charAt(0).toLocaleUpperCase();
				visitorName += token.substring(1);
			}

			_types[index] = type;
			_typeNames[index] = typeName;
			_names[index] = name;
			_visitorNames[index] = visitorName;

			if (type === null)
			{
				_codes[null] = 0x00;
			}
			else
			{
				_codes[type] = index;
			}
		}

		private static function init():void
		{
			_types = [];
			_typeNames = [];
			_names = [];
			_visitorNames = [];
			_codes = new Dictionary();

			addOpcode(0x00, "OP_0x00", null);
			addOpcode(0x01, "bkpt", Bkpt);
			addOpcode(0x02, "nop", Nop);
			addOpcode(0x03, "throw", Throw);
			addOpcode(0x04, "getsuper", Getsuper);
			addOpcode(0x05, "setsuper", Setsuper);
			addOpcode(0x06, "dxns", Dxns);
			addOpcode(0x07, "dxnslate", Dxnslate);
			addOpcode(0x08, "kill", Kill);
			addOpcode(0x09, "label", Label);
			addOpcode(0x0a, "OP_0x0A", null);
			addOpcode(0x0b, "OP_0x0B", null);
			addOpcode(0x0c, "ifnlt", Ifnlt);
			addOpcode(0x0d, "ifnle", Ifnle);
			addOpcode(0x0e, "ifngt", Ifngt);
			addOpcode(0xf, "ifnge", Ifnge);
			addOpcode(0x10, "jump", Jump);
			addOpcode(0x11, "iftrue", Iftrue);
			addOpcode(0x12, "iffalse", Iffalse);
			addOpcode(0x13, "ifeq", Ifeq);
			addOpcode(0x14, "ifne", Ifne);
			addOpcode(0x15, "iflt", Iflt);
			addOpcode(0x16, "ifle", Ifle);
			addOpcode(0x17, "ifgt", Ifgt);
			addOpcode(0x18, "ifge", Ifge);
			addOpcode(0x19, "ifstricteq", Ifstricteq);
			addOpcode(0x1a, "ifstrictne", Ifstrictne);
			addOpcode(0x1b, "lookupswitch", Lookupswitch);
			addOpcode(0x1c, "pushwith", Pushwith);
			addOpcode(0x1d, "popscope", Popscope);
			addOpcode(0x1e, "nextname", Nextname);
			addOpcode(0x1f, "hasnext", Hasnext);
			addOpcode(0x20, "pushnull", Pushnull);
			addOpcode(0x21, "pushundefined", Pushundefined);
			addOpcode(0x22, "pushuninitialized", Pushuninitialized);
			addOpcode(0x23, "nextvalue", Nextvalue);
			addOpcode(0x24, "pushbyte", Pushbyte);
			addOpcode(0x25, "pushshort", Pushshort);
			addOpcode(0x26, "pushtrue", Pushtrue);
			addOpcode(0x27, "pushfalse", Pushfalse);
			addOpcode(0x28, "pushnan", Pushnan);
			addOpcode(0x29, "pop", Pop);
			addOpcode(0x2a, "dup", Dup);
			addOpcode(0x2b, "swap", Swap);
			addOpcode(0x2c, "pushstring", Pushstring);
			addOpcode(0x2d, "pushint", Pushint);
			addOpcode(0x2e, "pushuint", Pushuint);
			addOpcode(0x2f, "pushdouble", Pushdouble);
			addOpcode(0x30, "pushscope", Pushscope);
			addOpcode(0x31, "pushnamespace", Pushnamespace);
			addOpcode(0x32, "hasnext2", Hasnext2);
			addOpcode(0x33, "pushdecimal", Pushdecimal);
			addOpcode(0x34, "pushdnan", Pushdnan);
			addOpcode(0x35, "li8", Li8);
			addOpcode(0x36, "li16", Li16);
			addOpcode(0x37, "li32", Li32);
			addOpcode(0x38, "lf32", Lf32);
			addOpcode(0x39, "lf64", Lf64);
			addOpcode(0x3a, "si8", Si8);
			addOpcode(0x3b, "si16", Si16);
			addOpcode(0x3c, "si32", Si32);
			addOpcode(0x3d, "sf32", Sf32);
			addOpcode(0x3e, "sf64", Sf64);
			addOpcode(0x3f, "OP_0x3F", null);
			addOpcode(0x40, "newfunction", Newfunction);
			addOpcode(0x41, "call", Call);
			addOpcode(0x42, "construct", Construct);
			addOpcode(0x43, "callmethod", Callmethod);
			addOpcode(0x44, "callstatic", Callstatic);
			addOpcode(0x45, "callsuper", Callsuper);
			addOpcode(0x46, "callproperty", Callproperty);
			addOpcode(0x47, "returnvoid", Returnvoid);
			addOpcode(0x48, "returnvalue", Returnvalue);
			addOpcode(0x49, "constructsuper", Constructsuper);
			addOpcode(0x4a, "constructprop", Constructprop);
			addOpcode(0x4b, "callsuperid", Callsuperid);
			addOpcode(0x4c, "callproplex", Callproplex);
			addOpcode(0x4d, "callinterface", Callinterface);
			addOpcode(0x4e, "callsupervoid", Callsupervoid);
			addOpcode(0x4f, "callpropvoid", Callpropvoid);
			addOpcode(0x50, "sxi1", Sxi1);
			addOpcode(0x51, "sxi8", Sxi8);
			addOpcode(0x52, "sxi16", Sxi16);
			addOpcode(0x53, "applytype", Applytype);
			addOpcode(0x54, "OP_0x54", null);
			addOpcode(0x55, "newobject", Newobject);
			addOpcode(0x56, "newarray", Newarray);
			addOpcode(0x57, "newactivation", Newactivation);
			addOpcode(0x58, "newclass", Newclass);
			addOpcode(0x59, "getdescendants", Getdescendants);
			addOpcode(0x5a, "newcatch", Newcatch);
			addOpcode(0x5b, "deldescendants", Deldescendants);
			addOpcode(0x5c, "OP_0x5C", null);
			addOpcode(0x5d, "findpropstrict", Findpropstrict);
			addOpcode(0x5e, "findproperty", Findproperty);
			addOpcode(0x5f, "finddef", Finddef);
			addOpcode(0x60, "getlex", Getlex);
			addOpcode(0x61, "setproperty", Setproperty);
			addOpcode(0x62, "getlocal", Getlocal);
			addOpcode(0x63, "setlocal", Setlocal);
			addOpcode(0x64, "getglobalscope", Getglobalscope);
			addOpcode(0x65, "getscopeobject", Getscopeobject);
			addOpcode(0x66, "getproperty", Getproperty);
			addOpcode(0x67, "OP_0x67", null);
			addOpcode(0x68, "initproperty", Initproperty);
			addOpcode(0x69, "OP_0x69", null);
			addOpcode(0x6a, "deleteproperty", Deleteproperty);
			addOpcode(0x6b, "OP_0x6B", null);
			addOpcode(0x6c, "getslot", Getslot);
			addOpcode(0x6d, "setslot", Setslot);
			addOpcode(0x6e, "getglobalslot", Getglobalslot);
			addOpcode(0x6f, "setglobalslot", Setglobalslot);
			addOpcode(0x70, "convert_s", ConvertS);
			addOpcode(0x71, "esc_xelem", EscXelem);
			addOpcode(0x72, "esc_xattr", EscXattr);
			addOpcode(0x73, "convert_i", ConvertI);
			addOpcode(0x74, "convert_u", ConvertU);
			addOpcode(0x75, "convert_d", ConvertD);
			addOpcode(0x76, "convert_b", ConvertB);
			addOpcode(0x77, "convert_o", ConvertO);
			addOpcode(0x78, "checkfilter", Checkfilter);
			addOpcode(0x79, "convert_m", ConvertM);
			addOpcode(0x7a, "convert_m_p", ConvertMP);
			addOpcode(0x7b, "OP_0x7B", null);
			addOpcode(0x7c, "OP_0x7C", null);
			addOpcode(0x7d, "OP_0x7D", null);
			addOpcode(0x7e, "OP_0x7E", null);
			addOpcode(0x7f, "OP_0x7F", null);
			addOpcode(0x80, "coerce", Coerce);
			addOpcode(0x81, "coerce_b", CoerceB);
			addOpcode(0x82, "coerce_a", CoerceA);
			addOpcode(0x83, "coerce_i", CoerceI);
			addOpcode(0x84, "coerce_d", CoerceD);
			addOpcode(0x85, "coerce_s", CoerceS);
			addOpcode(0x86, "astype", Astype);
			addOpcode(0x87, "astypelate", Astypelate);
			addOpcode(0x88, "coerce_u", CoerceU);
			addOpcode(0x89, "coerce_o", CoerceO);
			addOpcode(0x8a, "OP_0x8A", null);
			addOpcode(0x8b, "OP_0x8B", null);
			addOpcode(0x8c, "OP_0x8C", null);
			addOpcode(0x8d, "OP_0x8D", null);
			addOpcode(0x8e, "OP_0x8E", null);
			addOpcode(0x8f, "negate_p", NegateP);
			addOpcode(0x90, "negate", Negate);
			addOpcode(0x91, "increment", Increment);
			addOpcode(0x92, "inclocal", Inclocal);
			addOpcode(0x93, "decrement", Decrement);
			addOpcode(0x94, "declocal", Declocal);
			addOpcode(0x95, "typeof", Typeof);
			addOpcode(0x96, "not", Not);
			addOpcode(0x97, "bitnot", Bitnot);
			addOpcode(0x98, "OP_0x98", null);
			addOpcode(0x99, "OP_0x99", null);
			addOpcode(0x9a, "concat", Concat);
			addOpcode(0x9b, "add_d", AddD);
			addOpcode(0x9c, "increment_p", IncrementP);
			addOpcode(0x9d, "inclocal_p", InclocalP);
			addOpcode(0x9e, "decrement_p", DecrementP);
			addOpcode(0x9f, "declocal_p", DeclocalP);
			addOpcode(0xa0, "add", Add);
			addOpcode(0xa1, "subtract", Subtract);
			addOpcode(0xa2, "multiply", Multiply);
			addOpcode(0xa3, "divide", Divide);
			addOpcode(0xa4, "modulo", Modulo);
			addOpcode(0xa5, "lshift", Lshift);
			addOpcode(0xa6, "rshift", Rshift);
			addOpcode(0xa7, "urshift", Urshift);
			addOpcode(0xa8, "bitand", Bitand);
			addOpcode(0xa9, "bitor", Bitor);
			addOpcode(0xaa, "bitxor", Bitxor);
			addOpcode(0xab, "equals", Equals);
			addOpcode(0xac, "strictequals", Strictequals);
			addOpcode(0xad, "lessthan", Lessthan);
			addOpcode(0xae, "lessequals", Lessequals);
			addOpcode(0xaf, "greaterthan", Greaterthan);
			addOpcode(0xb0, "greaterequals", Greaterequals);
			addOpcode(0xb1, "instanceof", Instanceof);
			addOpcode(0xb2, "istype", Istype);
			addOpcode(0xb3, "istypelate", Istypelate);
			addOpcode(0xb4, "in", In);
			addOpcode(0xb5, "add_p", AddP);
			addOpcode(0xb6, "subtract_p", SubtractP);
			addOpcode(0xb7, "multiply_p", MultiplyP);
			addOpcode(0xb8, "divide_p", DivideP);
			addOpcode(0xb9, "modulo_p", ModuloP);
			addOpcode(0xba, "OP_0xBA", null);
			addOpcode(0xbb, "OP_0xBB", null);
			addOpcode(0xbc, "OP_0xBC", null);
			addOpcode(0xbd, "OP_0xBD", null);
			addOpcode(0xbe, "OP_0xBE", null);
			addOpcode(0xbf, "OP_0xBF", null);
			addOpcode(0xc0, "increment_i", IncrementI);
			addOpcode(0xc1, "decrement_i", DecrementI);
			addOpcode(0xc2, "inclocal_i", InclocalI);
			addOpcode(0xc3, "declocal_i", DeclocalI);
			addOpcode(0xc4, "negate_i", NegateI);
			addOpcode(0xc5, "add_i", AddI);
			addOpcode(0xc6, "subtract_i", SubtractI);
			addOpcode(0xc7, "multiply_i", MultiplyI);
			addOpcode(0xc8, "OP_0xC8", null);
			addOpcode(0xc9, "OP_0xC9", null);
			addOpcode(0xca, "OP_0xCA", null);
			addOpcode(0xcb, "OP_0xCB", null);
			addOpcode(0xcc, "OP_0xCC", null);
			addOpcode(0xcd, "OP_0xCD", null);
			addOpcode(0xce, "OP_0xCE", null);
			addOpcode(0xcf, "OP_0xCF", null);
			addOpcode(0xd0, "getlocal0", Getlocal0);
			addOpcode(0xd1, "getlocal1", Getlocal1);
			addOpcode(0xd2, "getlocal2", Getlocal2);
			addOpcode(0xd3, "getlocal3", Getlocal3);
			addOpcode(0xd4, "setlocal0", Setlocal0);
			addOpcode(0xd5, "setlocal1", Setlocal1);
			addOpcode(0xd6, "setlocal2", Setlocal2);
			addOpcode(0xd7, "setlocal3", Setlocal3);
			addOpcode(0xd8, "OP_0xD8", null);
			addOpcode(0xd9, "OP_0xD9", null);
			addOpcode(0xda, "OP_0xDA", null);
			addOpcode(0xdb, "OP_0xDB", null);
			addOpcode(0xdc, "OP_0xDC", null);
			addOpcode(0xdd, "OP_0xDD", null);
			addOpcode(0xde, "OP_0xDE", null);
			addOpcode(0xdf, "OP_0xDF", null);
			addOpcode(0xe0, "OP_0xE0", null);
			addOpcode(0xe1, "OP_0xE1", null);
			addOpcode(0xe2, "OP_0xE2", null);
			addOpcode(0xe3, "OP_0xE3", null);
			addOpcode(0xe4, "OP_0xE4", null);
			addOpcode(0xe5, "OP_0xE5", null);
			addOpcode(0xe6, "OP_0xE6", null);
			addOpcode(0xe7, "OP_0xE7", null);
			addOpcode(0xe8, "OP_0xE8", null);
			addOpcode(0xe9, "OP_0xE9", null);
			addOpcode(0xea, "OP_0xEA", null);
			addOpcode(0xeb, "OP_0xEB", null);
			addOpcode(0xec, "OP_0xEC", null);
			addOpcode(0xed, "OP_0xED", null);
			addOpcode(0xee, "abs_jump", AbsJump);
			addOpcode(0xef, "debug", Debug);
			addOpcode(0xf0, "debugline", Debugline);
			addOpcode(0xf1, "debugfile", Debugfile);
			addOpcode(0xf2, "bkptline", Bkptline);
			addOpcode(0xf3, "timestamp", Timestamp);
			addOpcode(0xf4, "OP_0xF4", null);
			addOpcode(0xf5, "verifypass", Verifypass);
			addOpcode(0xf6, "alloc", Alloc);
			addOpcode(0xf7, "mark", Mark);
			addOpcode(0xf8, "wb", Wb);
			addOpcode(0xf9, "prologue", Prologue);
			addOpcode(0xfa, "sendenter", Sendenter);
			addOpcode(0xfb, "doubletoatom", Doubletoatom);
			addOpcode(0xfc, "sweep", Sweep);
			addOpcode(0xfd, "codegenop", Codegenop);
			addOpcode(0xfe, "verifyop", Verifyop);
			addOpcode(0xff, "decode", Decode);
		}
		init();
	}
}
